package wlt.xxljob.service;
/**
 * jobinfo的增删改查服务
 * @author wuliting
 * @date 2021/12/7
**/
public interface JobInfoService {
    /**
     * 调度类型为Cron表达式
     * @param jobDesc
     * @param jobCron
     * @param executorParam
     * @return
     */
    int add(String jobDesc,String jobCron,String executorParam);
    void update(String id,String jobDesc,String jobCron,String executorParam);

    /**
     * 调度类型为固定速率
     * @param jobDesc
     * @param seconds 间隔秒数
     * @param executorParam
     * @return
     */
    int add(String jobDesc,int seconds,String executorParam);
    void update(String id,String jobDesc,int seconds,String executorParam);

    /**
     * 更通用的新增方法(不推荐使用)
     * @param jobDesc
     * @param scheduleType 调度类型
     * @param scheduleConf 调度配置
     * @param executorParam
     * @return
     */
    int add(String jobDesc, String scheduleType,String scheduleConf,String executorParam);
    void update(String id, String jobDesc, String scheduleType,String scheduleConf,String executorParam);

    void remove(int id);
    void select(String jobDesc);
}
